Imports System.Reflection
Imports System.Collections.Generic
Imports System.Linq
Imports System.IO
Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Content
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Input.Touch
Imports Microsoft.Xna.Framework.Input



Public Class Level
	Public rows As RoomRow()
	Public levelName As Enumeration.LevelName = Enumeration.LevelName.dungeon_demo


	Public Sub New()
		rows = New RoomRow(9) {}

		For x As Integer = 0 To rows.Count() - 1
			rows(x) = New RoomRow(10)
		Next
	End Sub

	Public Sub New(sizeRow As Integer, sizeColumn As Integer)
		rows = New RoomRow(sizeRow - 1) {}

		For x As Integer = 0 To rows.Count() - 1
			rows(x) = New RoomRow(sizeColumn)

		Next
	End Sub

	'public RoomNew UpRoom(RoomNew room)
	'{
	'    for (int y = 0; y < rows.Count(); y++)
	'    {
	'        for (int x = 0; x < rows[y].columns.Count(); x++)
	'        {
	'            rows[y].columns[x]. == 
	'        }
	'    }
	'    return null;
	'}


	Public Sub Serialize()
		Dim ax As New System.Xml.Serialization.XmlSerializer(GetType(Level))
		Dim writer As TextWriter = New StreamWriter("C:\temp\LEVEL_" & levelName.ToString() & ".xml")
		ax.Serialize(writer, Me)
	End Sub

End Class
